﻿<Window x:Uid="Window_1" x:Class="WgpgGUI.EncryptionDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:my="clr-namespace:WgpgGUI"
        xmlns:gpgapi="clr-namespace:GpgApi;assembly=GpgApi"
        Title="Encrypt" Height="555" Width="615" MinHeight="555" MinWidth="615" Icon="/WgpgCore;component/Images/encrypt_16.png">
    
    <Window.CommandBindings>
        <CommandBinding x:Uid="CommandBinding_1" Command="{x:Static my:EncryptionDialog.EncryptCommand}" CanExecute="Encrypt_CanExecute" Executed="Encrypt_Executed" />
    </Window.CommandBindings>

    <Grid x:Uid="Grid_1">
        <Grid.ColumnDefinitions>
            <ColumnDefinition x:Uid="ColumnDefinition_1"/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition x:Uid="RowDefinition_1" Height="Auto"/>
            <RowDefinition x:Uid="RowDefinition_2" Height="Auto"/>
            <RowDefinition x:Uid="RowDefinition_3"/>
            <RowDefinition x:Uid="RowDefinition_4" Height="Auto"/>
            <RowDefinition x:Uid="RowDefinition_5" Height="Auto"/>
            <RowDefinition x:Uid="RowDefinition_6" Height="Auto"/>
            <RowDefinition x:Uid="RowDefinition_7" Height="Auto"/>
            <RowDefinition x:Uid="RowDefinition_8" Height="Auto"/>
            <RowDefinition x:Uid="RowDefinition_9" Height="Auto"/>
            <RowDefinition x:Uid="RowDefinition_10" Height="Auto"/>
        </Grid.RowDefinitions>

        <Grid x:Uid="Grid_2" Grid.Row="0" Grid.Column="0" Margin="15 15 15 15" Visibility="{Binding Path=EncryptToFile, Mode=OneWay, Converter={StaticResource BooleanToVisibilityConverter}}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition x:Uid="ColumnDefinition_2" Width="*"/>
                <ColumnDefinition x:Uid="ColumnDefinition_3" Width="Auto"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition x:Uid="RowDefinition_12" Height="Auto"/>
                <RowDefinition x:Uid="RowDefinition_13" Height="Auto"/>
            </Grid.RowDefinitions>
            
            <TextBlock x:Uid="TextBlock_2" Text="Encrypt to" Grid.Row="0" Grid.ColumnSpan="2"/>
            <TextBox x:Uid="TextBox_1" Grid.Row="1" Grid.Column="0" Margin="0 5 10 0" VerticalAlignment="Center" Text="{Binding Path=EncryptedFileName}"/>
            <Button x:Uid="Button_1" Grid.Row="1" Grid.Column="1" Content="..." Margin="0 5 0 0" Padding="5 0 5 0" MinWidth="0" VerticalAlignment="Center" Click="SelectFileName"/>
        </Grid>

        <Line x:Uid="Line_1" Grid.Row="1" Grid.Column="0" X1="100" Y1="0" Margin="15 0 15 15" Stroke="Gray" SnapsToDevicePixels="True" IsManipulationEnabled="False" Stretch="Fill" StrokeMiterLimit="10" Visibility="{Binding Path=EncryptToFile, Mode=OneWay, Converter={StaticResource BooleanToVisibilityConverter}}"/>

        <Grid x:Uid="Grid_3" Grid.Row="2" Grid.Column="0" Margin="15 0 15 15">
            <CheckBox x:Uid="CheckBox_1" IsChecked="{Binding Path=UsePublicKey}" Content="Encrypt using public _keys" />
            <ListBox x:Uid="listPublic" SelectionMode="Multiple" ScrollViewer.VerticalScrollBarVisibility="Visible" ScrollViewer.HorizontalScrollBarVisibility="Visible" VerticalAlignment="Stretch" Margin="0 20 0 0" Name="listPublic" ItemsSource="{Binding}" DisplayMemberPath="UserInfos[0].FullInfo" IsEnabled="{Binding Path=UsePublicKey, RelativeSource={RelativeSource AncestorType=Window}}" ItemContainerStyle="{StaticResource CheckListItem}"/>
        </Grid>

        <Line x:Uid="Line_2" Grid.Row="3" Grid.Column="0" X1="100" Y1="0" Margin="15 0 15 15" Stroke="Gray" SnapsToDevicePixels="True" IsManipulationEnabled="False" Stretch="Fill" StrokeMiterLimit="10" />

        <StackPanel x:Uid="StackPanel_1" Grid.Row="4" Grid.Column="0" Margin="15 0 15 15">
            <CheckBox x:Uid="CheckBox_2" IsChecked="{Binding Path=UseCipherAlgorithm}" Content="Encrypt using a symmetric _algorithm"/>
            <ComboBox x:Uid="cboBoxCipher" Name="cboBoxCipher" Margin="0 5 0 0" IsEnabled="{Binding Path=UseCipherAlgorithm}">
                <ComboBoxItem x:Uid="ComboBoxItem_1" Content="3 DES" Tag="{x:Static gpgapi:CipherAlgorithm.ThreeDes}"/>
                <ComboBoxItem x:Uid="ComboBoxItem_2" Content="Cast 5" Tag="{x:Static gpgapi:CipherAlgorithm.Cast5}"/>
                <ComboBoxItem x:Uid="ComboBoxItem_3" Content="BlowFish" Tag="{x:Static gpgapi:CipherAlgorithm.BlowFish}"/>
                <ComboBoxItem x:Uid="ComboBoxItem_4" Content="AES" Tag="{x:Static gpgapi:CipherAlgorithm.Aes}"/>
                <ComboBoxItem x:Uid="ComboBoxItem_5" Content="AES 192" Tag="{x:Static gpgapi:CipherAlgorithm.Aes192}"/>
                <ComboBoxItem x:Uid="ComboBoxItem_6" Content="AES 256" Tag="{x:Static gpgapi:CipherAlgorithm.Aes256}" IsSelected="True"/>
                <ComboBoxItem x:Uid="ComboBoxItem_7" Content="TwoFish" Tag="{x:Static gpgapi:CipherAlgorithm.TwoFish}"/>
                <ComboBoxItem x:Uid="ComboBoxItem_8" Content="Camellia 128" Tag="{x:Static gpgapi:CipherAlgorithm.Camellia128}"/>
                <ComboBoxItem x:Uid="ComboBoxItem_9" Content="Camellia 192" Tag="{x:Static gpgapi:CipherAlgorithm.Camellia192}"/>
                <ComboBoxItem x:Uid="ComboBoxItem_10" Content="Camellia 256" Tag="{x:Static gpgapi:CipherAlgorithm.Camellia256}"/>
            </ComboBox>
        </StackPanel>

        <Line x:Uid="Line_3" Grid.Row="5" Grid.Column="0" X1="100" Y1="0" Margin="15 0 15 15" Stroke="Gray" SnapsToDevicePixels="True" IsManipulationEnabled="False" Stretch="Fill" StrokeMiterLimit="10" />

        <StackPanel x:Uid="StackPanel_2" Grid.Row="6" Grid.Column="0" Margin="15 0 15 15">
            <CheckBox x:Uid="CheckBox_3" IsChecked="{Binding Path=SignFile}" Content="_Sign with"/>
            <ComboBox x:Uid="cboBoxSignature" Margin="0 5 0 0" Name="cboBoxSignature" ItemsSource="{Binding}" DisplayMemberPath="UserInfos[0].FullInfo" IsEnabled="{Binding Path=SignFile, RelativeSource={RelativeSource AncestorType=Window}}" />
        </StackPanel>

        <Line x:Uid="Line_4" Grid.Row="7" Grid.Column="0" X1="100" Y1="0" Margin="15 0 15 15" Stroke="Gray" SnapsToDevicePixels="True" IsManipulationEnabled="False" Stretch="Fill" StrokeMiterLimit="10" Visibility="{Binding Path=ShowExtraOptions, Mode=OneWay, Converter={StaticResource BooleanToVisibilityConverter}}"/>

        <StackPanel x:Uid="StackPanel_3" Grid.Row="8" Grid.Column="0" Margin="15 0 15 15" Visibility="{Binding Path=ShowExtraOptions, Mode=OneWay, Converter={StaticResource BooleanToVisibilityConverter}}">
            <CheckBox x:Uid="CheckBox_4" Content="_ASCII Armored Encryption" Margin="0 0 0 4" IsChecked="{Binding Path=ASCIIArmored}"/>
            <CheckBox x:Uid="CheckBox_5" Content="_Hide User ID" Margin="0 0 0 4" IsChecked="{Binding Path=HideUserId}" IsEnabled="{Binding Path=UsePublicKey}"/>
        </StackPanel>
        
        <StackPanel x:Uid="StackPanel_4" Grid.Row="9" HorizontalAlignment="Right" Orientation="Horizontal">
            <Button x:Uid="Button_2" Content="_Encrypt" Width="Auto" Command="{x:Static my:EncryptionDialog.EncryptCommand}"/>
            <Button x:Uid="Button_3" Content="_Cancel" Width="Auto" Click="CancelClick" IsDefault="True"/>
        </StackPanel>
    </Grid>
</Window>
